package Input;

import java.awt.Color;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import Announcements.Announcement;
import Main.SpaceGame;
import Menus.BuildMenu;
import Menus.BuildingMenu;
import Menus.CursorMenu;
import Menus.DesignationMenu;
import Menus.FullAnnouncementMenu;
import Menus.HireMenu;
import Menus.ViewMenu;

public class SideMenuInput implements KeyListener 
{
	SpaceGame main;
	public SideMenuInput(SpaceGame main) 
	{
		this.main = main;
	}

	public void keyPressed(KeyEvent e) 
	{
		if (e.getKeyCode() == KeyEvent.VK_L)
		{
			main.menuManager.addMenu(new CursorMenu(main));			//this adds a new cursor menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_D)
		{
			main.menuManager.addMenu(new DesignationMenu());	//this adds a new Designation menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_B)
		{
			main.menuManager.addMenu(new BuildMenu());	//this adds a new Build Menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_A)
		{
			main.menuManager.addMenu(new FullAnnouncementMenu(main));	//this adds a new fullscreen announcement Menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_Q)
		{
			main.menuManager.addMenu(new BuildingMenu(main));	//this adds a new Building menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_V)
		{
			main.menuManager.addMenu(new ViewMenu(main));	//this adds a new Entity viewing menu
		}
		
		else if (e.getKeyCode() == KeyEvent.VK_G)
		{
			if(main.constructionManager.showingDefenseGrid)
				main.constructionManager.showingDefenseGrid = false;
			else
				main.constructionManager.showingDefenseGrid = true;
		}
	}

	public void keyReleased(KeyEvent arg0) 
	{
		
	}

	public void keyTyped(KeyEvent arg0) 
	{
		
	}
	
}
